﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Kooboo.Commerce
{
    public static class AreaRegistrationContextEx
    {
        public static Route MapRouteEx(this AreaRegistrationContext context, string name, string url, object defaults, string menu)
        {
            var route = context.MapRoute(name, url, defaults);

            route.DataTokens["menu"] = menu;

            return route;
        }

        public static Route MapRouteEx(this AreaRegistrationContext context, string name, string url, object defaults, object validations, string menu)
        {
            var route = context.MapRoute(name, url, defaults, validations);

            route.DataTokens["menu"] = menu;

            return route;
        }
    }
}